From 928dd09524c0fa4a10fdea479c110b522b73b6e9 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Thu, 18 May 2006 11:39:42 +0000 Subject: [PATCH] canonicalize the name of the "activate-slider" style property and use 2006-05-18 Michael Natterer * gtk/gtkrange.c: canonicalize the name of the "activate-slider" style property and use GTK_PARAM_READABLE instead of G_PARAM_READABLE. Moved one "activate_slider" variable to the local scope its used in. --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ gtk/gtkrange.c | 23 +++++++++++++---------- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed500ccb9a..f0645b183f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-05-18 Michael Natterer + + * gtk/gtkrange.c: canonicalize the name of the "activate-slider" + style property and use GTK_PARAM_READABLE instead of + G_PARAM_READABLE. Moved one "activate_slider" variable to the + local scope its used in. + 2006-06-18 Michael Emmel * gdk/directfb/gdkscreen-directfb.c: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ed500ccb9a..f0645b183f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2006-05-18 Michael Natterer + + * gtk/gtkrange.c: canonicalize the name of the "activate-slider" + style property and use GTK_PARAM_READABLE instead of + G_PARAM_READABLE. Moved one "activate_slider" variable to the + local scope its used in. + 2006-06-18 Michael Emmel * gdk/directfb/gdkscreen-directfb.c: diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index fffe05e21c..51199cb33e 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -393,11 +393,11 @@ gtk_range_class_init (GtkRangeClass *class) GTK_PARAM_READABLE)); gtk_widget_class_install_style_property (widget_class, - g_param_spec_boolean ("activate_slider", + g_param_spec_boolean ("activate-slider", P_("Draw slider ACTIVE during drag"), P_("With this option set to TRUE, sliders will be drawn ACTIVE and with shadow IN while they are dragged"), FALSE, - G_PARAM_READABLE)); + GTK_PARAM_READABLE)); } static void @@ -1134,7 +1134,6 @@ gtk_range_expose (GtkWidget *widget, gint focus_line_width = 0; gint focus_padding = 0; gboolean touchscreen; - gboolean activate_slider; g_object_get (gtk_widget_get_settings (widget), "gtk-touchscreen-mode", &touchscreen, @@ -1203,8 +1202,10 @@ gtk_range_expose (GtkWidget *widget, if (range->layout->grab_location == MOUSE_SLIDER) { - gtk_widget_style_get (widget, "activate_slider", &activate_slider, NULL); - + gboolean activate_slider; + + gtk_widget_style_get (widget, "activate-slider", &activate_slider, NULL); + if (activate_slider) { state = GTK_STATE_ACTIVE; @@ -1518,13 +1519,15 @@ gtk_range_button_press (GtkWidget *widget, } range_grab_add (range, MOUSE_SLIDER, event->button); - - gtk_widget_style_get (widget, "activate_slider", &activate_slider, NULL); - - /* force a redraw, if the active slider is drawn differently to the prelight one */ + + gtk_widget_style_get (widget, "activate-slider", &activate_slider, NULL); + + /* force a redraw, if the active slider is drawn differently to the + * prelight one + */ if (activate_slider) gtk_widget_queue_draw (widget); - + if (need_value_update) update_slider_position (range, event->x, event->y); -- 2.30.2